package cn.wolfcode.web.controller;

import cn.wolfcode.quest.CustomerReportQueryObject;
import cn.wolfcode.service.ICustomerReportService;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/customerReport")
public class CustomerReportController {

    @Autowired
    private ICustomerReportService reportService;

    @RequestMapping("/list")
    public String list(@ModelAttribute("qo") CustomerReportQueryObject qo, Model model){
        PageInfo list = reportService.getList(qo);
        model.addAttribute("pageResult",list);
        return "customerReport/list";
    }


}
